package com.nxw.springcloud.gateway.spi;

import com.chanjet.common.endpoint.pojo.ChanjetValueResult;
import com.nxw.springcloud.gateway.config.FeignConfiguration;
import com.nxw.springcloud.gateway.entity.EnvironmentEnum;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name= "${services.gateWayAdmin}",configuration = FeignConfiguration.class)
public interface GateWayAdminRemote {
    @GetMapping("/limitInfo/get")
    ChanjetValueResult<String> getAppKeyAndSecret(@RequestParam String appKey,
                                                  @RequestParam EnvironmentEnum environment);
    @GetMapping("/gateway-routes/getLimitConfig")
    String getRouteById(@RequestParam String routeId);

    @GetMapping("/appKey/getAppKey")
    String getAppKey(@RequestParam String appKey,
                    @RequestParam EnvironmentEnum environment);

    @GetMapping("/version/lastVersion")
    Long getVersion();

    @GetMapping("/gateway-routes/routes")
    String getRoutes();
}